<ion-view view-title="{{title}}">
  <div class="bar bar-subheader">
    <div class="button-bar">
      <button class="button button-outline button-energized-crm padding-right" ng-click="doClear()">清除选项</button>
      <button class="button button-energized-crm padding-left" ng-click="doAct()">确定</button>
    </div>
  </div>
  <ion-content class="crm-content has-tabs-top">
    <ul class="list crm-list-ul">
      <div  ng-repeat="group in filter.groups" ng-if="group.display!='none'">
        <li class="item item-icon-right"
            ng-click="toggleGroup(group)">
          <div class="row">
            <div class="col-60">
              {{group.name}}
            </div>
            <div class="col-40 text-right item-right">
              <p>{{filter.getName(group.id)}}</p>
            </div>
          </div>
          <i class="icon icon-accessory"  ng-class="isGroupShown(group) ? 'ion-chevron-down' : 'ion-chevron-right'"></i>
        </li>
        <li class="list-item list-child padding-left">
          <ion-radio class="item-accordion" name="{{group.id}}" ng-model="filter.selected[group.id]" ng-value="item.id" ng-repeat="item in group.items"
                     ng-show="isGroupShown(group)"> {{item.name}}</ion-radio>
        </li>
      </div>

      <!--<li class="item row">-->
        <!--<div class="col">-->
          <!--<button class="button button-block button-outline button-energized-crm" ng-click="doClear()">清除筛选条件</button>-->
        <!--</div>-->
        <!--<div class="col">-->
          <!--<button class="button button-block button-energized-crm" ng-click="doAct()">确定</button>-->
        <!--</div>-->
      <!--</li>-->
    </ul>
    <div  ng-repeat="visit in filter.charsVisit" ng-if="filter.charsVisit.length > 0">
      <ul>
        <li class="item item-icon-right"
            ng-click="toggleGroup(visit)">
          <div class="row">
            <div class="col-60">
              {{visit.name}}
            </div>
            <div class="col-40 text-right item-right">
              <p>{{filter.getVisitName(visit.id)}}</p>
            </div>
          </div>
          <i class="icon icon-accessory"  ng-class="isGroupShown(visit) ? 'ion-chevron-down' : 'ion-chevron-right'"></i>
        </li>
        <li class="list-item list-child padding-left">
          <ion-radio class="item-accordion" name="{{visit.id}}" ng-model="filter.selected[visit.id]" ng-value="item.id" ng-repeat="item in visit.items"
                     ng-show="isGroupShown(visit)"> {{item.name}}</ion-radio>
        </li>
      </ul>
    </div>
  </ion-content>
</ion-view>
<style>
  .button-bar > .button:first-child,
  .button-bar > .button:last-child
  {
    border-radius: 4px;
    border-width: 1px;
  }
  .button-bar > .button:first-child{
    margin-right: 10px;
  }
</style>